package autotrade.data.structure;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class FxDatum {
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;
	
	@Persistent
	private String paircode;
	@Persistent
	private Date datetime;
	@Persistent
	private Double open;
	@Persistent
	private Double high;
	@Persistent
	private Double low;
	@Persistent
	private Double close;
	
	public Key getKey() { return key; }
	public void setKey(Key key) { this.key = key; }
	public String getPaircode() { return paircode; }
	public Date getDatetime() { return datetime; }
	public void setDatetime(Date datetime) { this.datetime = datetime; }
	public void setPaircode(String paircode) { this.paircode = paircode; }
	public Double getOpen() { return open; }
	public void setOpen(Double open) { this.open = open; }
	public Double getHigh() { return high; }
	public void setHigh(Double high) { this.high = high; }
	public Double getLow() { return low; }
	public void setLow(Double low) { this.low = low; }
	public Double getClose() { return close; }
	public void setClose(Double close) { this.close = close; }
	
	public String toString() {
		return "paircode = " + paircode
			+", datetime = " + datetime
			+", open = " + open
			+", high = " + high
			+", low = " + low
			+", close = " + close;
	}
}
